package com.freework.context.web.spring;

import java.util.Locale;
import java.util.Set;

import org.springframework.web.servlet.View;

import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
public class SysFreeMarkerViewResolver extends FreeMarkerViewResolver {
	Set<String> viewNames=null;
	public void setViewNames(Set<String>  viewNames) {
		this.viewNames = viewNames;
	}
	@Override
	protected  View loadView(String viewName, Locale locale) throws Exception{
		if(viewNames.contains(viewName))
			return super.loadView(viewName, locale);
		else
			return null;
	}

	
}
